Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configs to specify keepAlive and shutdownTimeout for GrpcQueryClient #13546

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

mayankshriv
Copy link
Contributor

@mayankshriv mayankshriv commented Jul 4, 2024

Added configs to specify keepAlive and shutdownTimeout for GrpcQueryClient.

  • Added channelShutdownTimeoutSecond config for GrpcQueryClient with default of 10s.
  • Added configs for keep-alive:
    • channelKeepAliveEnabled to enable/disable the feature, default false.
    • channelKeepAliveTimeSeconds to configures the interval for sending keep-alive pings, default 300 seconds (5 minutes).
    • channelKeepAliveTimeoutSeconds configures the timeout for waiting for a ping acknowledgment, default 300 seconds (5 minutes).
    • channelKeepAliveWithoutCalls ensures pings are sent even when there are no active calls, keeping the connection alive during idle period, default true.

@mayankshriv mayankshriv force-pushed the grpc branch 3 times, most recently from 565f80e to bb4b271 Compare July 4, 2024 23:37
@codecov-commenter
Copy link

codecov-commenter commented Jul 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 16 lines in your changes missing coverage. Please review.

Project coverage is 62.12%. Comparing base (59551e4) to head (d3889a5).
Report is 730 commits behind head on master.

Files Patch % Lines
...pache/pinot/common/utils/grpc/GrpcQueryClient.java 0.00% 12 Missing ⚠️
...ava/org/apache/pinot/common/config/GrpcConfig.java 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13546      +/-   ##
============================================
+ Coverage     61.75%   62.12%   +0.37%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2558     +122     
  Lines        133233   140916    +7683     
  Branches      20636    21866    +1230     
============================================
+ Hits          82274    87543    +5269     
- Misses        44911    46741    +1830     
- Partials       6048     6632     +584     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 62.07% <0.00%> (+0.36%) ⬆️
java-21 61.98% <0.00%> (+0.36%) ⬆️
skip-bytebuffers-false 62.10% <0.00%> (+0.35%) ⬆️
skip-bytebuffers-true 61.96% <0.00%> (+34.23%) ⬆️
temurin 62.12% <0.00%> (+0.37%) ⬆️
unittests 62.11% <0.00%> (+0.37%) ⬆️
unittests1 46.65% <0.00%> (-0.24%) ⬇️
unittests2 27.69% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yashmayya yashmayya added the Configuration Config changes (addition/deletion/change in behavior) label Jul 8, 2024
Comment on lines 35 to 41
// KeepAlive configs
private static final String CONFIG_CHANNEL_KEEP_ALIVE_ENABLED = "channelKeepAliveEnabled";
// To control keep alive on no usage
private static final boolean DEFAULT_CHANNEL_KEEP_ALIVE_ENABLED = false;

private static final String CONFIG_CHANNEL_KEEP_ALIVE_TIME_SECONDS = "channelKeepAliveTimeSeconds";
private static final int DEFAULT_CHANNEL_KEEP_ALIVE_TIME_SECONDS = 300; // 5 minutes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider merging this 2? Basically enabling keep alive is equivalent to setting the keep alive time to a positive value

Copy link
Contributor Author

@mayankshriv mayankshriv Jul 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the PR to keep default value as -1 to indiciate disabled. Users will need to set to > 0 to enable the feature.

@mayankshriv mayankshriv force-pushed the grpc branch 2 times, most recently from 52ceccd to b464d6d Compare July 8, 2024 23:11
…ent.

- Added `channelShutdownTimeoutSecond` config for `GrpcQueryClient` with default of 10s.
- Added configs for keep-alive:
  - `channelKeepAliveEnabled` to enable/disable the feature, default false.
  - `channelKeepAliveTimeiSeconds` to configures the interval for sending keep-alive pings,
     default 300 seconds (5 minutes).
  - `channelKeepAliveTimeoutSeconds` configures the timeout for waiting for a ping acknowledgment,
     default 300 seconds (5 minutes).
  - `channelKeepAliveWithoutCalls` ensures pings are sent even when there are no active calls,
     keeping the connection alive during idle period, default true.
@mayankshriv mayankshriv merged commit efa4300 into apache:master Jul 9, 2024
20 checks passed
@mayankshriv mayankshriv deleted the grpc branch July 9, 2024 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Configuration Config changes (addition/deletion/change in behavior) documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants